#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<errno.h>
#include<signal.h>
#include<sys/time.h>
#include<fcntl.h>
#include<unistd.h> 
#include<pthread.h>

void myfunc(int signum){
	printf("myfunction is work\n");
}

int main(int argc, char *args[])
{
	struct sigaction act, oldact;

	act.sa_handler = myfunc;
	sigemptyset(&act.sa_mask);
	act.sa_flags = 0;

	sigaction(SIGINT, &act, &oldact);

	int ret;

	ret = sigaction(SIGINT, &act, &oldact);
	if(ret < 0){
		perror("sigaction error");
		exit(1);
	}

	while(1);
	return 0;
	
}
